home *** CD-ROM | disk | FTP | other *** search
/ Progresivas Profesijas / Progresivas prof.iso / mac / MacOsX / files / Screensaver.swf / scripts / frame_158 / DoAction.as
Text File  |  2007-03-06  |  776b  |  37 lines

  1. function endm()
  2. {
  3.    clearInterval(IntervalId);
  4.    talak = true;
  5. }
  6. function Kustini(KustObj)
  7. {
  8.    var _loc1_ = KustObj;
  9.    _loc1_._x += stepx;
  10.    _loc1_._y += stepy;
  11.    if(_loc1_._x + _loc1_._width > ScreenSize_x)
  12.    {
  13.       stepx = -2;
  14.    }
  15.    if(_loc1_._y + _loc1_._height > ScreenSize_y)
  16.    {
  17.       stepy = -2;
  18.    }
  19.    if(_loc1_._x < 0)
  20.    {
  21.       stepx = 2;
  22.    }
  23.    if(_loc1_._y < 0)
  24.    {
  25.       stepy = 2;
  26.    }
  27. }
  28. ScreenSize_x = 1024;
  29. ScreenSize_y = 768;
  30. stepx = 2;
  31. stepy = 2;
  32. LaiksSpelet = 20000;
  33. KustProfesija._x = Math.floor(Math.random() * (ScreenSize_x - KustProfesija._width));
  34. KustProfesija._y = Math.floor(Math.random() * (ScreenSize_y - KustProfesija._height));
  35. talak = false;
  36. IntervalId = setInterval(this,"endm",LaiksSpelet);
  37.